Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbeat/beat: introduce Beat.OutputConfigReloader #28048

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

axw
Copy link
Member

@axw axw commented Sep 22, 2021

What does this PR do?

Introduce Beat.OutputConfigReloader, an optional reload.Reloadable that may be set by a beat.Creator in order to watch output config changes. This will be called in addition to the reloader that libbeat registers internally.

Why is it important?

  1. apm-server needs the elasticsearch output config for tail-based sampling
  2. It is only possible to register a single output reloader

We can hook into the output reloader using this approach to extract the config we require.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
    - [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Note regarding testing: normally I would write a test for a change like this, but there does not appear to be any framework for writing similar tests. The code is trivial enough that I don't want to get bogged down introducing a framework.

@axw axw added enhancement v7.16.0 backport-v7.16.0 Automated backport with mergify labels Sep 22, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 22, 2021
Introduce Beat.OutputConfigReloader, an optional
reload.Reloadable that may be set by a beat.Creator
in order to watch output config changes.
@axw axw force-pushed the beat-outputconfigreloader branch from b2e947f to e67c93b Compare September 22, 2021 10:24
@axw axw marked this pull request as ready for review September 22, 2021 10:24
@axw axw added the Team:Elastic-Agent Label for the Agent team label Sep 23, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 23, 2021
@axw axw requested a review from a team October 4, 2021 00:34
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-04T02:52:15.344+0000

  • Duration: 141 min 16 sec

  • Commit: 6a461f3

Test stats 🧪

Test Results
Failed 0
Passed 54183
Skipped 5346
Total 59529

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@axw axw merged commit 67f2e2b into elastic:master Oct 4, 2021
@axw axw deleted the beat-outputconfigreloader branch October 4, 2021 05:15
mergify bot pushed a commit that referenced this pull request Oct 4, 2021
Introduce Beat.OutputConfigReloader, an optional
reload.Reloadable that may be set by a beat.Creator
in order to watch output config changes.

(cherry picked from commit 67f2e2b)
axw added a commit that referenced this pull request Oct 4, 2021
Introduce Beat.OutputConfigReloader, an optional
reload.Reloadable that may be set by a beat.Creator
in order to watch output config changes.

(cherry picked from commit 67f2e2b)

Co-authored-by: Andrew Wilkins <[email protected]>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
Introduce Beat.OutputConfigReloader, an optional
reload.Reloadable that may be set by a beat.Creator
in order to watch output config changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify enhancement Team:Elastic-Agent Label for the Agent team v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants